<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>菜单列表-添加菜单</title>
<link href="__PUBLIC__/admin/css/style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="__PUBLIC__/admin/js/jquery.js"></script>

<link href="__PUBLIC__/admin/css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/admin/js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/js/select-ui.min.js"></script>

<link href="__PUBLIC__/validform/Validform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/validform/Validform_v5.3.2.js"></script>
<script type="text/javascript" src="__PUBLIC__/validform/Validform_Datatype.js"></script>
<script type="text/javascript">
$(document).ready(function(e) {
    $("#menu_type").uedSelect({
		width : 345			  
	});
});
</script>
</head>

<body>

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="{:U('index/welcome')}">首页</a></li>
			<li><a href="{:U('menuinfo/index')}">菜单列表</a></li>
			<li><a href="#">添加菜单</a></li>
		</ul>
    </div>
    
    <div class="formbody">
    
		<div class="formtitle"><span>添加菜单</span></div>

		<form name="myform" id="myform" action="{:U('menuinfo/addmenuinfo')}" method="post">
			<ul class="forminfo">
				<li><label>菜单名</label><input name="info[menu_title]" id="menu_title" type="text" class="dfinput" datatype="*2-30" errormsg="菜单名范围在2~30位之间！" maxlength="30" value="" /><i class="Validform_checktip"></i></li>
				<li><label>菜单父节点</label>
					<input name="menu_father_title" id="menu_father_title" type="text" class="dfinput" datatype="s2-30" errormsg="菜单名范围在2~30位之间！" maxlength="30" value="{$father_menuinfo.menu_title}" readonly />
					<i class="Validform_checktip"></i>
					<input name="info[menu_fatherid]" id="menu_fatherid" type="hidden" class="dfinput" datatype="/^[1-9]\d*|0$/" errormsg="菜单父节点范围在1~5位之间！" maxlength="5" value="{$father_menuinfo.menu_id}" />
				</li>
				<li><label>菜单类型</label>
					<div class="vocation">
						<select id="menu_type" name="info[menu_type]" datatype="*" errormsg="菜单类型不能为空！">
							<option value="">选择菜单类型</option>
							<option value="1">顶部菜单</option>
							<option value="2">左侧一级菜单</option>
							<option value="3">左侧二级菜单</option>
							<option value="4">操作菜单</option>
						</select>
					</div>
					<i class="Validform_checktip"></i>
				</li>

				<li><label>控制器</label><input name="info[menu_controller]" id="menu_controller" type="text" class="dfinput" datatype="s2-20" errormsg="控制器范围在2~20位之间！" maxlength="20" value="" /><i class="Validform_checktip"></i></li>
				<li><label>方法</label><input name="info[menu_action]" id="menu_action" type="text" class="dfinput" datatype="s2-20" errormsg="方法范围在2~20位之间！" maxlength="20" value="" /><i class="Validform_checktip"></i></li>
				<li><label>菜单图标</label><input name="info[menu_icon]" id="menu_icon" type="text" class="dfinput" datatype="s2-20" errormsg="菜单图标范围在2~20位之间！" maxlength="20" value="" /><i class="Validform_checktip"></i></li>
				<li><label>排序</label><input name="info[menu_order]" id="menu_order" type="text" class="dfinput" datatype="/^[1-9]\d*|0$/" errormsg="控制器范围在1~5位之间！" maxlength="5" value="0" /><i class="Validform_checktip"></i></li>

				<li><label>&nbsp;</label><input name="loginbtn" type="submit" class="btn" value="确认保存"/></li>
			</ul>
		</form>
    
    </div>

	<script>
	$(function(){
		$("#myform").Validform({
			//tiptype:2
			tiptype:function(msg,o,cssctl){
				var objtip=o.obj.siblings(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
			}
		});
	}); 
	</script>
</body>

</html>
